package com.jh.readme.iu.fragment.newslist;

import com.jh.tools.bean.NeteastNewsSummary;
import com.jh.tools.common.http.RequestMange;

import java.util.List;
import java.util.Map;

import rx.Observable;

/**
 * Created by niejiahuan on 2016/5/31.
 */
public class NewsListModel implements NewsListContract.Model {

    @Override
    public Observable<Map<String, List<NeteastNewsSummary>>> getNewsDate(Map<String,String> params, long cPage) {
        return RequestMange.getInstance().getNewsListObservable(params,(int)cPage);
    }

    @Override
    public Observable getDate(Map<String, String> map) {
        return RequestMange.getInstance().getNewsListObservable(map,Integer.parseInt(map.get("nPage")));
    }
}
